package ${cfg.controllerVoPackage};

<#list table.importPackages as pkg>
<#if (pkg!"") == "java.time.LocalDateTime">
import java.util.Date;
import com.ea.demo.autogenapi.base.DateJsonDeserializer;
import com.ea.demo.autogenapi.base.DateJsonSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;
<#else>
import ${pkg};
</#if>
</#list>
<#if swagger2>
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
</#if>
<#if entityLombokModel>
import lombok.Data;
</#if>
import com.ea.demo.autogenapi.base.vo.BaseVo;
import com.ea.demo.autogenapi.base.vo.PageParam;
/**
  * <p>
  * AutoGenerator Api接口封装类
  * </p>
  * @author ${author}
  * @since ${date}
  */
public class ${entity}ApiWrapper {


    <#-- 新增和更新vo对象 -->
    <#if entityLombokModel>
    @Data
    </#if>
    <#if swagger2>
    @ApiModel(value="${entity}对象", description="${table.comment!}")
    </#if>
    public static class ${entity}Vo extends BaseVo {

    <#-- ----------  BEGIN 字段循环遍历  ---------->
    <#list table.fields as field>
    <#if field.comment!?length gt 0>
    <#if swagger2>
        @ApiModelProperty(value = "${field.comment}")
    <#else>
        /**
        * ${field.comment}
        */
    </#if>
    </#if>
        <#if field.propertyType == "LocalDateTime">
        @JsonSerialize(using = DateJsonSerializer.class)
        @JsonDeserialize(using = DateJsonDeserializer.class)
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date ${field.propertyName};
        <#else>
        private ${field.propertyType} ${field.propertyName};
        </#if>
    </#list>
    <#------------  END 字段循环遍历  ---------->
    }

    <#-- 查询对象 -->
    <#if entityLombokModel>
    @Data
    </#if>
    <#if swagger2>
    @ApiModel(value="${entity}查询对象", description="${table.comment!}")
    </#if>
    public static class ${entity}SearchVo extends PageParam {

    }

}